package o;

import android.app.Activity;
import android.content.Context;
import android.provider.Settings.Global;
import com.huawei.appgallery.share.api.ShareBean;
import com.huawei.appgallery.share.protocol.ShareDialogActivityProtocol;

public class cwo {

    static final class a implements cww {
        private a() {
        }

        public void ˎ(Context context, ShareBean shareBean) {
            int i = 1;
            if (context == null || !(context instanceof Activity)) {
                cwr.ॱ.ˊ("ShareFactory", "no Acitivty.");
                return;
            }
            cwr.ॱ.ˋ("ShareFactory", "title:" + shareBean.ॱ() + ",deficon:" + shareBean.ˏ() + ",fromWhere:" + shareBean.ʼ() + ",appId:" + shareBean.ᐝ() + ",appIdType:" + shareBean.ʽ() + "packageName: " + shareBean.ॱॱ());
            cjo shareDialogActivityProtocol = new ShareDialogActivityProtocol();
            if (Global.getInt(context.getContentResolver(), "hwkidsmode_running", 0) != 1) {
                i = 0;
            }
            if (i != 0) {
                shareBean.ˏ(2);
            }
            shareDialogActivityProtocol.ˊ(shareBean);
            cjk.ˎ().ˋ(context, new cjm("share_dialog.activity", shareDialogActivityProtocol));
        }
    }

    public static cww ˊ() {
        return new a();
    }
}
